{template "content","header"}
<link href="{CSS_PATH}dialog_simp.css" rel="stylesheet" type="text/css" />
<link href="{CSS_PATH}member_login.css" rel="stylesheet" type="text/css" />
<link href="{CSS_PATH}table_form.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="{JS_PATH}cookie.js"></script>
<script type="text/javascript" src="{JS_PATH}member_common.js"></script>
<script type="text/javascript" src="{JS_PATH}dialog.js"></script>
<script type="text/javascript" src="{JS_PATH}formvalidator.js" charset="UTF-8"></script>
<script type="text/javascript" src="{JS_PATH}formvalidatorregex.js" charset="UTF-8"></script>
<script language="JavaScript">
<!--
$(function(){
	$.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
	$("#username").formValidator({onshow:"{L('input').L('username')}",onfocus:"{L('between_2_to_20')}"}).inputValidator({min:2,max:20,onerror:"{L('between_2_to_20')}"}).regexValidator({regexp:"ps_username",datatype:"enum",onerror:"{L('username').L('format_incorrect')}"});
	$("#password").formValidator({onshow:"{L('input').L('password')}",onfocus:"{L('password').L('between_6_to_20')}"}).inputValidator({min:6,max:20,onerror:"{L('password').L('between_6_to_20')}"});

});
//-->
</script>
<div class="main">
	<div id="memberlogin">
		<div class="col-left form-login" id="logindiv">
		<form method="post" action="" onsubmit="save_username();" id="myform" name="myform">
		<input type="hidden" name="forward" id="forward" value="{$forward}">
		<input type="hidden" name="dosubmit" id="dosubmit" value="1">
				<h2>{L('member').L('login')}</h2>
				<div class="input">
					<label>{L('username')}：</label><input type="text" id="username" name="username" size="22" class="input-text1">
				</div>
				<div class="input">
					<label>{L('password')}：</label><input type="password" id="password" name="password" size="22" class="input-text1">
				</div>
				<div class="input">
					<label>{L('checkcode')}：</label><input type="text" id="code" name="code" size="8" class="input-text1" style="width:150px;">{form::checkcode('code_img', '4', '14', 84, 30)}
				</div>
				<div class="take">
				<input type="checkbox" name="cookietime" value="2592000" id="cookietime"> {L('remember')}{L('username')}
				<a href="index.php?m=member&c=index&a=public_forget_password&siteid={$siteid}" class="blue">{L('forgetpassword')}</a><br />
				<div class="submit1"><input type="image" src="{CSS_PATH}images/login.jpg" />
				</div>
				</div>
				<div class="reg">使用合作网站账号登陆：<br />
					<ul>
					{if $setting['connect_enable']}
							{if $setting['sina_akey'] || $setting['sina_skey']}
								<li><a href="javascript:;" onclick="show_login('sina');return false;" ><img src="{CSS_PATH}images/weibo.jpg"></a></li>
							{/if}
	
							{if $setting['qq_akey'] || $setting['qq_skey']}
								<li><a href="javascript:;" onclick="show_login('qq');return false;" ><img src="{CSS_PATH}images/qq2.jpg"></a></li>
							{/if}
							{if $setting['qq_appkey'] || $setting['qq_appid']}
								<li><a href="{APP_PATH}index.php?m=member&c=index&a=public_qq_loginnew" target="_blank"><img src="{CSS_PATH}images/qq.jpg"></a></li>
							{/if}
					{/if}
					</ul>
				</div>
		</form>
		</div>
		<div class="col-auto login_right">
				<span class="txt">注册</span>
				<span style="margin-top:65px; margin-bottom:10px;">还没有账号?</span>
				<span><a href="{APP_PATH}index.php?m=member&c=index&a=register&siteid=1"><img src="{CSS_PATH}images/reg.jpg"></a></span>
		</div>
	</div>
</div>
<script language="JavaScript">
<!--

	$(function(){
		$('#username').focus();
	})

	function save_username() {
		if($('#cookietime').attr('checked')==true) {
			var username = $('#username').val();
			setcookie('username', username, 3);
		} else {
			delcookie('username');
		}
	}
	var username = getcookie('username');
	if(username != '' && username != null) {
		$('#username').val(username);
		$('#cookietime').attr('checked',true);
	}

	function show_login(site) {
		if(site == 'sina') {
			art.dialog({lock:false,title:'{L('sina_login')}',id:'protocoliframe', iframe:'index.php?m=member&c=index&a=public_sina_login',width:'500',height:'310',yesText:'{L('close')}'}, function(){
			});
		} else if(site == 'snda') {
			art.dialog({lock:false,title:'{L('snda_login')}',id:'protocoliframe', iframe:'index.php?m=member&c=index&a=public_snda_login',width:'500',height:'310',yesText:'{L('close')}'}, function(){
			});
		} else if(site == 'qq') {
			art.dialog({lock:false,title:'{L('qq_login')}',id:'protocoliframe', iframe:'index.php?m=member&c=index&a=public_qq_login',width:'500',height:'310',yesText:'{L('close')}'}, function(){
			});
		}
	}
//-->
</script>
{template 'member', 'footer'}